package vip.zcn.mrn.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import vip.zcn.mrn.model.Person;
import vip.zcn.mrn.service.IdCardService;


/**
 * 身份证信息控制器
 * @author 张灿能
 * @create: 2025-08-04 15:15
 */
@RestController
@RequestMapping("/idcard")
@RequiredArgsConstructor
public class IdCardController {
    private final IdCardService idCardService;

    @GetMapping("/masked")
    public Person getMasked(@RequestParam String name) {
        return idCardService.getPersonMasked(name);
    }

    @GetMapping("/full")
    public Person getFull(@RequestParam String name) {
        return idCardService.getPersonFull(name);
    }
}